package com.mycompany.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.mycompany.entity.Period;
import com.mycompany.repository.PeriodDao;
import com.mycompany.service.PeriodService;

@Service
public class PeriodServiceImpl implements PeriodService {
	
	@Autowired
	private PeriodDao periodDao;

	@Override
	@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
	public void persist(Period period) {
		periodDao.persist(period);
	}

	@Override
	@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
	public void merge(Period period) {
		periodDao.merge(period);
	}

	@Override
	@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
	public void remove(Period period) {
		periodDao.remove(period);
	}

	@Override
	public Period findById(Integer periodId) {
		return periodDao.findById(periodId);
	}

	@Override
	public Period find(Period period) {
		return periodDao.find(period);
	}

	@Override
	public List<Period> findAll() {
		return periodDao.findAll();
	}

	@Override
	public List<Period> findListByCodition(Period period) {
		return periodDao.findListByCodition(period);
	}

}
